package model

import "time"

const SysAlertRuleTable = "alert_rule"

type SysAlertRule struct {
	Id              int       `json:"id" gorm:"primaryKey;autoIncrement;column:id"`
	NodePrimaryId   int       `json:"node_primary_id" gorm:"column:node_primary_id"`   // 节点ID-节点表ID
	RuleName        string    `json:"rule_name" gorm:"column:rule_name"`               // 规则名称
	AnnounceType    int       `json:"announce_type" gorm:"column:announce_type"`       // 通知类型
	AlertUserId     int       `json:"alert_user_id" gorm:"column:alert_user_id"`       // 报警人
	AlertType       int       `json:"alert_type" gorm:"column:alert_type"`             // 报警类型
	AlertQuota      string    `json:"alert_quota" gorm:"column:alert_quota"`           // 告警指标
	TriggerOperator string    `json:"trigger_operator" gorm:"column:trigger_operator"` // 操作符
	TriggerValue    string    `json:"trigger_value" gorm:"column:trigger_value"`       // 阈值
	Status          int       `json:"status" gorm:"status"`
	CreateUserName  string    `json:"create_user_name" gorm:"column:create_user_name"`
	CreateTime      time.Time `json:"create_time" gorm:"column:create_time"`
	UpdateUserName  string    `json:"update_user_name" gorm:"column:update_user_name"`
	UpdateTime      time.Time `json:"update_time" gorm:"column:update_time"`
}
